<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button onclick="kai()">求分辨率</button>
    <button onclick="test()">location测试</button>
    <script>
        /* 1.screen屏幕对象 */
        //怎么知道电脑屏幕多大？也就是求分辨率？
        function kai(){
            alert(window.screen.width+ "|" +window.screen.height);
        }

        /* 2.location资源定位 */
        //包含有关当前URL的信息，通常用来做页面跳转
        function test(){
            console.log("当前页面的URL路径地址："+ location.href);
            location.reload();//重新加载当前页面（刷新）
            location.href = "http://lagou.com"; //跳转页面
        }


    </script>
</body>
</html>